/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package schtohan.entities;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

/**
 *
 * @author Schtohan
 */
@Entity
public class Stop implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long Id;
    private String name;
    private String depTime;
    private Integer stopNr;
    private String delay;
    @ManyToOne
    private Journey journey;

    public Stop() {
    }

    public Stop(String name, String depTime) {
        this.name = name;
        this.depTime = depTime;
    }

    public Stop(String name, String depTime, int stopNr, Journey journey) {
        this.name = name;
        this.depTime = depTime;
        this.stopNr = stopNr;
        this.journey = journey;
    }

    public Long getId() {
        return Id;
    }

    public void setId(Long Id) {
        this.Id = Id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDepTime() {
        return depTime;
    }

    public void setDepTime(String depTime) {
        this.depTime = depTime;
    }

    public Integer getStopNr() {
        return stopNr;
    }

    public void setStopNr(Integer stopNr) {
        this.stopNr = stopNr;
    }    

    public String getDelay() {
        return delay;
    }

    public void setDelay(String delay) {
        this.delay = delay;
    }

    public Journey getJourney() {
        return journey;
    }

    public void setJourney(Journey journey) {
        this.journey = journey;
    }
 
}
